﻿#ifndef DRAWRULER_H
#define DRAWRULER_H

#include <QPointF>
#include <QPainter>
#include <QFont>
#include <QPen>
#include <QColor>
#include "TextBlock.h"
#include "ImageView.h"
#include "../Nosepiece/NosepieceCommon/LensManager.h"

namespace Qly {

/**
 * @brief The DrawRuler class 在相机图像上显示一个标尺
 */
class DrawRuler
{
public:

    DrawRuler(ImageView * view);
    void draw( QPainter &painter );
//    void setLineWidth(int width);
//    void setColor(QColor color);
private:
    void drawRuler(QPainter &painter);
    void drawText(QPainter &painter);
    bool m_showRuler;
    bool m_showLensName;
    TextBlock m_textBlock;
    ImageView * m_view;
    QPoint m_center;
    QPen m_linePen;//线的颜色
};

}//namespace Qly
#endif // DRAWRULER_H
